package com.hotel.service;

import com.hotel.dao.YuMapper;
import com.hotel.pojo.Yu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class YuServiceImpl implements YuService {

    @Autowired
    YuMapper yuMapper;

    public int addVip(Yu vip) {
        return yuMapper.addVip(vip);
    }

    public int deleteVipById(int id) {
        return yuMapper.deleteVipById(id);
    }

    public int updateVipById(Yu vip) {
        return yuMapper.updateVipById(vip);
    }

    public Yu queryVipById(int id) {
        return yuMapper.queryVipById(id);
    }

    public ArrayList<Yu> queryAllVip() {
        return yuMapper.queryAllVip();
    }

    public Yu queryVipByPhone(String phone) {
        return yuMapper.queryVipByPhone(phone);
    }
}
